#pragma once
#include"common.h"
#include"Channel.h"

class Channel;
class Epoll
{
public:
    Epoll();
    //获得触发事件channel
    std::vector<Channel*>  poll(int timeout=-1);
    //更新channel:q
    void updateChannel(Channel*);
    ~Epoll();

private:
    int _epfd;  
    struct epoll_event* _events;  
};